#ifndef __QGCM_PROFILE_READERS__
#define __QGCM_PROFILE_READERS__

#include "forward_classes.h"
#include "datatypes.h"
#include "constants.h"
#include "model.h"
#include "mappers.h"
#include "misclib.h"

void computecrossprodmagnitude(REAL &, const REAL &, const REAL &, const REAL &);
// ------------------------------------------------------------------
// Fortran calls
extern "C" {
	void computecrossprodmagnitude_(
			REAL &, const REAL &, const REAL &, const REAL &);

	// function below is no longer used because 
	// we no longer integrate parts of the integrand
	// that are no symmetric in k,p,q over the fine
	// mesh ...
	void computestaticpartr_( 
			REAL &   fREAL, REAL &   fimag, 
			const REAL& nk, const REAL& np, 
			const REAL&  k, const REAL&  p, 
			const REAL& q
			);
}; // end extern "C"
//------------------------------------------------------------------

qgcomplex compute_asymKPQintegrand(const REAL &, const REAL &, const REAL &, const INDEX &, const INDEX &);

qgcomplex computeR_mknpkpq_staticelement(INDEX mki, INDEX npi, REAL mk, REAL np, REAL k, REAL p, REAL q);

// Note the model should support overloading of all these functions
// with user defined ones (much slower but necessary maybe);
bool computeP_def (const rank3 & );
REAL computeQ_def (const model_class & mo, const REAL &, const rank2 &);

REAL computeA_wmap (const rank6 &, const int nfs, const map_container<REAL, 3> * Q,
		const map_container<REAL, 3> * QI, bool (*computeP_def) (const rank3 & ) );

void set_fourier_transform_coefficient(const REAL &);

#endif
